package com.yfp.client.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yfp.client.domain.OrderList;

import java.math.BigDecimal;
import java.util.List;

/**
 *
 * @description 针对表【order_list(订单表)】的数据库操作Service
 * @createDate 2024-06-20 19:28:46
 */
public interface OrderListService extends IService<OrderList> {

    /**
     * 根据订单id查询订单
     *
     * @param orderId
     * @return
     */
    List<OrderList> listByOrderSn(String orderId);

    /**
     * 根据订单id查询订单
     *
     * @param orderDetailId
     * @return
     */
    OrderList listByOrderDetailId(String orderDetailId);

    List<OrderList> listByOrderSnAndStatus(String orderId, int status);

    /**
     * 根据套餐id查询
     *
     * @param comboId
     * @return
     */
    List<OrderList> listByComboId(String comboId);

    /**
     * 获取最后完成订单的点位ID
     * @param clientId
     * @return
     */
    String findLastPositionIdByClinetId(String clientId);

    void updateGiftGoldById(String orderListId, BigDecimal giftGold);
}
